package com.shop.trade.api.service;

import com.shop.common.model.InputBean;
import com.shop.common.model.ServiceBean;
import com.shop.common.model.param.trade.ShoppingCartInput;
import com.shop.common.model.result.trade.ShoppingCartOutput;

import java.util.List;
import java.util.Map;

/**
 * @Description:
 *
 * @author zhoulk
 * @date: 2019年04月05日  15:07
 */

public interface IShopCartSvc {

    /**
     * @Function com.shop.trade.api.service.IShopCartSvc.addShopCart
     * @Description //TODO 添加商品到购物车
     *
     * @param: shoppingCartInput
     * @return com.shop.common.model.ServiceBean
     * @errorCode //TODO
     *
     * @Author zhoulk
     * @Date 2019/4/5 15:09
     *
     **/
    ServiceBean<Integer> addToShopCart(ShoppingCartInput shoppingCartInput);

    /**
     * @Function com.shop.trade.api.service.IShopCartSvc.qryShopCarts
     * @Description //TODO 查询用户购物车商品列表
     *
     * @param: shoppingCartInput
     * @return com.shop.common.model.ServiceBean<com.sun.tools.javac.util.List < com.shop.common.model.result.trade.ShoppingCartOutput>>
     * @errorCode //TODO
     *
     * @Author zhoulk
     * @Date 2019/4/5 15:10
     *
     **/
    ServiceBean<List<ShoppingCartOutput>> qryShopCarts(ShoppingCartInput shoppingCartInput);

    ServiceBean<Map<Integer, List<ShoppingCartOutput>>> qryShoppingCarts4P(InputBean<ShoppingCartInput> inputBean);

    /**
     * @Function com.shop.trade.api.service.IShopCartSvc.delShopCart
     * @Description //TODO 删除购物车商品
     *
     * @param: shoppingCartInput
     * @return com.shop.common.model.ServiceBean<java.lang.String>
     * @errorCode //TODO
     *
     * @Author zhoulk
     * @Date 2019/4/5 15:12
     *
     **/
    ServiceBean<String> delShopCart(List<Integer> ids);

    /**
     * @Function com.shop.trade.api.service.IShopCartSvc.modShopCart
     * @Description //TODO 更新购物车信息
     *
     * @param: shoppingCartInput
     * @return com.shop.common.model.ServiceBean<java.lang.String>
     * @errorCode //TODO
     *
     * @Author zhoulk
     * @Date 2019/4/9 1:07
     *
     **/
    ServiceBean<Integer> modShopCartItemNum(ShoppingCartInput shoppingCartInput);
}
